--- linux-4.1.10.org/tools/perf/perf.c
+++ linux-4.1.10/tools/perf/perf.c
@@ -505,6 +505,17 @@
 	pthread_sigmask(SIG_UNBLOCK, &set, NULL);
 }
 
+unsigned cache_line_size() {
+	FILE * p = 0;
+	p = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
+	unsigned int i = 0;
+	if (p) {
+		fscanf(p, "%d", &i);
+		fclose(p);
+	}
+	return i;
+}
+
 int main(int argc, const char **argv)
 {
 	const char *cmd;
@@ -512,7 +523,7 @@
 
 	/* The page_size is placed in util object. */
 	page_size = sysconf(_SC_PAGE_SIZE);
-	cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
+	cacheline_size = cache_line_size();
 
 	cmd = perf_extract_argv0_path(argv[0]);
 	if (!cmd)
